package com.tuozixuan.tomj.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.tuozixuan.tomj.config.Sanction1Properties;
import com.tuozixuan.tomj.config.SanctionProperties;

@RestController
@RequestMapping("/test")
public class TestController {

	@Autowired
	private SanctionProperties sanctionProperties;
	
	@Autowired
	private Sanction1Properties sanction1Properties;
	
	@GetMapping("/getConfig")
	public String getConfig() {
		//return sanctionProperties.getXmlContentUrl();
		return sanctionProperties.getSanction().get("xmlContentUrl");
	}
	
	@GetMapping("/getConfig1")
	public String getConfig1() {
		return sanction1Properties.getSanction1().get("xmlContentUrl1");
	}
}
